<web-app xmlns="http://java.sun.com/xml/ns/javaee"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
      version="3.0">
  <!--
  <display-name>Uncomment and put name :here: for Tomcat Dashboard</display-name>-->

  <%- webxml.context_params.each do |name, value| -%>
  <context-param>
    <param-name><%= name %></param-name>
    <param-value><%= value %></param-value>
  </context-param>
  <%- end -%>

  <filter>
    <filter-name><%= webxml.servlet_filter_name %></filter-name>
    <filter-class><%= webxml.servlet_filter %></filter-class>
    <async-supported><%= !! webxml.servlet_filter_async %></async-supported>
  </filter>
  <filter-mapping>
    <filter-name><%= webxml.servlet_filter_name %></filter-name>
    <url-pattern><%= webxml.servlet_filter_url_pattern %></url-pattern>
  </filter-mapping>

  <%- webxml.servlet_context_listeners.each do |listener| -%>
  <listener>
    <listener-class><%= listener %></listener-class>
  </listener>
  <%- end -%>

  <%- [webxml.jndi].flatten.each do |jndi| -%>
  <resource-ref>
    <res-ref-name><%= jndi %></res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
  </resource-ref>
  <%- end if webxml.jndi -%>
</web-app>
